Use AC_USE_SYSTEM_EXTENSIONS instead of #define _GNU_SOURCE
authorColin Walters <walters@verbum.org>
Wed, 10 Jul 2013 17:24:15 +0000 (13:24 -0400)
committerColin Walters <walters@verbum.org>
Wed, 10 Jul 2013 17:25:35 +0000 (13:25 -0400)
It's less copy/paste, works everywhere, etc.

Also fix some missing #include "config.h".

configure.ac
src/libostree/ostree-core.c
src/libostree/ostree-diff.c
src/libostree/ostree-repo-traverse.c
src/libotutil/ot-unix-utils.c
src/ostree/ot-admin-cleanup.c
src/ostree/ot-admin-functions.c
src/ostree/ot-admin-util.c
src/switchroot/ostree-mount-util.c
src/switchroot/ostree-prepare-root.c
src/switchroot/ostree-remount.c

index 63986ab766b45b343c408390f4e67e9e116abba0..385d16f7efa84b81f4aca3b78d23d3ed057155d2 100644 (file)
@@ -7,6 +7,7 @@ AC_CONFIG_AUX_DIR([build-aux])
 AM_INIT_AUTOMAKE([1.11 -Wno-portability foreign no-define tar-ustar no-dist-gzip dist-xz])
 AM_MAINTAINER_MODE([enable])
 AM_SILENT_RULES([yes])
+AC_USE_SYSTEM_EXTENSIONS
 AC_SYS_LARGEFILE
 
 AC_PROG_CC
index fe76bd46a4679d4e886d66f8580edf5efc1dbb58..4e9fdf98ef0a9f4e9cd662e71ab5fb7d430e71c8 100644 (file)
@@ -20,9 +20,6 @@
  * Author: Colin Walters <walters@verbum.org>
  */
 
-/* for mkdtemp */
-#define _GNU_SOURCE
-
 #include "config.h"
 
 #include "ostree.h"
index 0a8222da8873d143ef245a45386b5b2f8bad9526..560ac808f47b03ae9dd798501ee8d566f4f4c2f9 100644 (file)
@@ -20,8 +20,6 @@
  * Author: Colin Walters <walters@verbum.org>
  */
 
-#define _GNU_SOURCE
-
 #include "config.h"
 
 #include "ostree.h"
index 70b22d7a9d4115b338a7b45adaab3b7b52fb0564..6838314d8a109f4247e228743d3ea1115a34dd9c 100644 (file)
@@ -20,8 +20,6 @@
  * Author: Colin Walters <walters@verbum.org>
  */
 
-#define _GNU_SOURCE
-
 #include "config.h"
 
 #include "ostree.h"
index 54c5ac146a9fcaad71822cf0f57c4534478873ac..8cb1992612e972b359648db615bae43945feb031 100644 (file)
@@ -22,8 +22,6 @@
 
 #include "config.h"
 
-#define _GNU_SOURCE
-
 #include "otutil.h"
 
 #include <gio/gio.h>
index d8d9e8e32e4bc5e276c7e6baa5b38d734ea0c811..9c2560f3dadb8bc69705d473711470f032dbf8d1 100644 (file)
@@ -20,7 +20,6 @@
  * Author: Colin Walters <walters@verbum.org>
  */
 
-#define _GNU_SOURCE
 #include "config.h"
 
 #include "ot-admin-functions.h"
index 3780c2a91520c16396e479c4c3c5b4949b4c783a..4c3cb49dd8fd9056434ea01651aae98832add513 100644 (file)
@@ -20,7 +20,6 @@
  * Author: Colin Walters <walters@verbum.org>
  */
 
-#define _GNU_SOURCE
 #include "config.h"
 
 #include "ot-admin-functions.h"
index 871871fd0b69d084182cda7e12dac06a812043c1..affe6db05c304bb852ba3eb1cb13e301bcc91b9e 100644 (file)
@@ -20,7 +20,6 @@
  * Author: Colin Walters <walters@verbum.org>
  */
 
-#define _GNU_SOURCE
 #include "config.h"
 
 #include "ot-admin-functions.h"
index c993c2383856c599703ed3f6cc285256a4b33cfe..c6df559cd71061627486713c8787647e1ff60d9f 100644 (file)
@@ -20,7 +20,7 @@
  * Author: Colin Walters <walters@verbum.org>
  */
 
-#define _GNU_SOURCE
+#include "config.h"
 
 #include <stdarg.h>
 #include <errno.h>
index cc885d3c3946044ca2a784cd5239a684eb4e128c..a77da7c64d79fdf6a91671e001b63f2f34e42ef9 100644 (file)
@@ -23,7 +23,9 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-#define _GNU_SOURCE
+
+#include "config.h"
+
 #include <sys/mount.h>
 #include <sys/types.h>
 #include <sys/stat.h>
index ff5a06da8870662a862337bfc81497952004f048..6dbeecc0e0489685152a6876aff5c77f22d9a3d7 100644 (file)
@@ -20,7 +20,7 @@
  * Author: Colin Walters <walters@verbum.org>
  */
 
-#define _GNU_SOURCE
+#include "config.h"
 
 #include <string.h>
 #include <stdio.h>